<include file="Public/frame-header" />
</head>
<body class="J_scroll_fixed" style="min-width:800px;">
<div class="wrap J_check_wrap">
	<ul class="nav nav-tabs">
	   <li class="active"><a href="{:U('/Admin/Coupon/userCoupon')}">已领取优惠券</a></li>
	   <li class=""><a href="{:U('/Admin/Coupon/sendCoupon')}">发放优惠券</a></li>
	</ul>
	<form class="well form-search" method="get" action="{:U('/Admin/Coupon/userCoupon')}">
		<div class="search_type cc mb10">
			<div class="mb10">
				<span class="mr20">分类： 
					优惠券： <input type="text" name="key" value="" style="width: 200px;" placeholder="优惠券"> &nbsp;&nbsp;
					优惠券编号： <input type="text" name="coupon_id" value="" style="width: 200px;" placeholder="优惠券编号"> &nbsp;&nbsp;
					用户编号： <input type="text" name="user_id" value="" style="width: 200px;" placeholder="用户编号"> &nbsp;&nbsp;
					<input type="submit" class="btn btn-primary" value="搜索">
				</span>
			</div>
		</div>
	</form>
	<form class="J_ajaxForm" action="" method="post">
		<div class="table-actions">
			<button class="btn btn-primary btn-small J_ajax_submit_btn" type="submit" 
			data-action="{:U('/Admin/Coupon/deleteUserCoupon')}" data-subcheck="true" data-msg="你确定删除吗？">删除</button>
		</div>
		<table class="table table-hover table-bordered table-list">
			<thead>
				<tr>
					<th width="15"><label><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x"></label></th>
					<th>编号</th>
					<th>优惠券编号</th>
					<th>优惠券名称</th>
					<th>领取者</th>
					<th>领取时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<foreach name="list" item="item">
			<tr>
				<td><input type="checkbox" class="J_check" data-yid="J_check_y" data-xid="J_check_x" name="ids[]" value="{$item.id}" ></td>
				<td>{$item.id}</td>
				<td>{$item.coupon_id}</td>
				<td>{$item.coupon_title}</td>
				<td>{$item.user_id}</td>
				<td>{$item.created|date="Y-m-d H:i:s",###}</td>
				<td>
					<if condition="$item ['status'] eq 2">
						已使用
					<elseif condition="$item ['status'] eq 1" />
						未使用
					<else />
						已删除
					</if>
				</td>
				<td >
<!-- 						<a href="{:U('/Admin/CouponCode/edit/id/'.$item['id'])}">修改</a> -->
					<if condition="$item ['status'] neq 0" >
					<a class="del" href="{:U('/Admin/CouponCode/delete/id/'.$item['id'])}">删除</a>
					</if>
				</td>
			</tr>
			</foreach>
			<tfoot>
				<tr>
					<th width="15"><label><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x"></label></th>
					<th>编号</th>
					<th>优惠券编号</th>
					<th>优惠券名称</th>
					<th>领取者</th>
					<th>领取时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</tfoot>
		</table>
		<div class="table-actions">
			<button class="btn btn-primary btn-small J_ajax_submit_btn" type="submit" 
			data-action="{:U('/Admin/Coupon/deleteUserCoupon')}" data-subcheck="true" data-msg="你确定删除吗？">删除</button>
		</div>
		<div class="pagination">{$Page}</div>
	</form>
	<script src="__ADMIN__/statics/js/common.js"></script>
</body>
</html>